require File.expand_path('../level', __FILE__)
class Script < ActiveRecord::Base
  has_many :script_levels
  has_many :levels, through: :script_levels
  has_many :stages
  has_many :users, through: :user_scripts
  has_many :user_scripts
  has_many :hint_view_requests
  has_one :plc_course_unit, class_name: 'Plc::CourseUnit', inverse_of: :script, dependent: :destroy
  belongs_to :wrapup_video, foreign_key: 'wrapup_video_id', class_name: 'Video'
  belongs_to :user
 end
